feat: remove deprecated CLI flags for HTTP/2, HTTPS, and web socket server options#5634
feat: remove deprecated CLI flags for HTTP/2, HTTPS, and web socket server options#5634bjohansebas wants to merge 4 commits intonextfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #5634 +/- ##
=======================================
Coverage 83.52% 83.52%
=======================================
Files 11 11
Lines 1936 1936
Branches 716 717 +1
=======================================
Hits 1617 1617
Misses 286 286
Partials 33 33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| - The following CLI options were deprecated and have now been removed. Please use the recommended alternatives: | ||
| - http2 -> server | ||
| - https -> server |
There was a problem hiding this comment.
Will just server work? Maybe server-type? Just to ensure we don't make a typo here 😄
There was a problem hiding this comment.
oh, do you provide here not CLI options, let's write CLI options here
There was a problem hiding this comment.
Just write webpack help serve --verbose and you will see all CLI options
There was a problem hiding this comment.
Thanks, I was looking for a way to reproduce and see them
There was a problem hiding this comment.
@alexander-akait I’m not fully understanding this. At what point is the cli-flags.js file executed within webpack-cli?
I’m asking because many of these options were removed in webpack-dev-server v5 — for example in this commit: 1e86e37
And this is the commit that updated the README accordingly 5c4006a
So it feels like those options no longer exist starting from webpack-dev-server v5, and this file was simply never updated — or maybe I’m missing something?
In any case, even when running from main, those options still don’t show up in the CLI. From what I understand, the file that actually defines the CLI options is options.json, which would make cli-flags.js unnecessary.
There was a problem hiding this comment.
I’m not fully understanding this. At what point is the cli-flags.js file executed within webpack-cli?
Yes, webpack-cli reads this file and getting all CLI flag from this file. Looks like we forgot to remove them. To avoid such things let's add a test case in CLI with --help and --verbose so we will have all CLI arguments in our tests
There was a problem hiding this comment.
Also let's use here the new CLI options = --server-type=https and etc
Summary
removing these options that are deprecate
What kind of change does this PR introduce?
Did you add tests for your changes?
Does this PR introduce a breaking change?
If relevant, what needs to be documented once your changes are merged or what have you already documented?